//
//  TableViewCell4Sec1.m
//  WashForU
//
//  Created by 王俊 on 15/12/5.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "TableViewCell4Sec1.h"
@interface TableViewCell4Sec1()

@property(nonatomic,strong)UILabel     *headerTitleLabel;
@property(nonatomic,strong)UILabel     *tailerTitleLabel;
@property(nonatomic,strong)UIImageView *rightArrowImage;


@end


@implementation TableViewCell4Sec1

- (instancetype)initWithHeaderTitle:(NSString*) headerTitle andTaillerTitle:(NSString*) tailerTitle
{
    if (self = [super init]) {
        self.headerTitleLabel = [[UILabel alloc]init];
        self.tailerTitleLabel = [[UILabel alloc]init];
        self.rightArrowImage = [[UIImageView alloc]init];

        self.headerTitleLabel.text = headerTitle;
        self.headerTitleLabel.textColor = [UIColor GrayColor_88];
        self.tailerTitleLabel.text = tailerTitle;
        self.tailerTitleLabel.font = [UIFont CustomFont:17];
        self.rightArrowImage.image = [UIImage imageNamed:@"右箭头"];
        
        [self addSubview:self.headerTitleLabel];
        [self addSubview:self.tailerTitleLabel];
        [self addSubview:self.rightArrowImage];
        
        [self.headerTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).offset(20);
            make.centerY.equalTo(self);
            make.height.mas_equalTo(30);
        }];
        [self.rightArrowImage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(10, 13));
            make.trailing.equalTo(self).offset(-10);
            make.centerY.equalTo(self);
        }];
        [self.tailerTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self.rightArrowImage.mas_leading).offset(-5);
            make.height.centerY.equalTo(self.headerTitleLabel);
        }];
        
    }
    return self;
}

- (void)awakeFromNib
{
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

}

@end
